CREATE TABLE [agency].[PortalConfiguration]
(
[PortalConfigurationId] [int] NOT NULL IDENTITY(1, 1),
[PortalId] [int] NULL,
[ConfigurationId] [int] NULL,
[Name] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Code] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DispalyOrder] [int] NOT NULL,
[Value] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Active] [bit] NOT NULL,
[Deleted] [bit] NOT NULL,
[CreatedBy] [int] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[ModifiedBy] [int] NULL,
[ModifiedOn] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [agency].[PortalConfiguration] ADD CONSTRAINT [PK_PortalConfiguration] PRIMARY KEY CLUSTERED  ([PortalConfigurationId]) ON [PRIMARY]
GO
ALTER TABLE [agency].[PortalConfiguration] ADD CONSTRAINT [FK_PortalConfiguration_Configuration] FOREIGN KEY ([ConfigurationId]) REFERENCES [agency].[Configuration] ([ConfigurationId])
GO
ALTER TABLE [agency].[PortalConfiguration] ADD CONSTRAINT [FK_PortalConfiguration_Portal] FOREIGN KEY ([PortalId]) REFERENCES [agency].[Portal] ([PortalId])
GO
